
package f.h.dragon.datastructures.bplustree;
	/// <summary>
	/// Tree index mapping Strings to Strings with unlimited key length
	/// </summary>
	public class HBplusTree extends BplusTreeString
	{
		HBplusTreeBytes xtree;
		public HBplusTree(HBplusTreeBytes tree) //: base(tree)
		{
			super(tree);
			this.xtree = tree;
		}
//		protected override boolean checkTree()
//		{
//			return false;
//		}
		public void LimitBucketSize(int limit) 
		{
			this.xtree.bucketSizeLimit = limit;
		}
		public static BplusTreeString Initialize(String treefileName, String blockfileName, int PrefixLength, int CultureId,
			int nodesize, int buffersize) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.initialize(treefileName, blockfileName, PrefixLength, CultureId, nodesize, buffersize);
			return new HBplusTree(tree);
		}
		public static BplusTreeString Initialize(String treefileName, String blockfileName, int PrefixLength, int CultureId) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.initialize(treefileName, blockfileName, PrefixLength, CultureId);
			return new HBplusTree(tree);
		}
		public static BplusTreeString Initialize(String treefileName, String blockfileName, int PrefixLength) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.initialize(treefileName, blockfileName, PrefixLength);
			return new HBplusTree(tree);
		}
		
		public static BplusTreeString Initialize(java.io.RandomAccessFile treefile, java.io.RandomAccessFile blockfile, int PrefixLength, int CultureId,
			int nodesize, int buffersize) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.initialize(treefile, blockfile, PrefixLength, CultureId, nodesize, buffersize);
			return new HBplusTree(tree);
		}
		public static BplusTreeString Initialize(java.io.RandomAccessFile treefile, java.io.RandomAccessFile blockfile, int PrefixLength, int CultureId) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.initialize(treefile, blockfile, PrefixLength, CultureId);
			return new HBplusTree(tree);
		}
		public static BplusTreeString Initialize(java.io.RandomAccessFile treefile, java.io.RandomAccessFile blockfile, int KeyLength) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.initialize(treefile, blockfile, KeyLength);
			return new HBplusTree(tree);
		}
		
		public static BplusTreeString ReOpen(java.io.RandomAccessFile treefile, java.io.RandomAccessFile blockfile) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.reOpen(treefile, blockfile);
			return new HBplusTree(tree);
		}
		public static BplusTreeString ReadOnly(String treefileName, String blockfileName) 
			throws Exception
		{
			HBplusTreeBytes tree = (HBplusTreeBytes) HBplusTreeBytes.readOnly(treefileName, blockfileName);
			return new HBplusTree(tree);
		}
//		public override String toHtml() 
//		{
//			return ((hBplusTreeBytes) this.tree).toHtml();
//		}
	}

